package com.comcast.util;

public interface Configurable {
    /**
     * Sets the property value - overrides any current values associated with the property key
     * @param key the property key
     * @param value the property value
     * @return boolean true if property was set, false otherwise
     */
	public boolean setProperty(String key, Object value);
	
	/**
	 * Adds a key/value pair to the Configuration.
	 * @param key the property key
	 * @param value the property value
	 * @return boolean true if property was added, false otherwise
	 */
	public boolean addProperty(String key, Object value);
	
    /**
     * Gets the property value associated with the specified property name.
     * 
     * @param name property name
     * @return property value or <code>null</code> if there is no property 
     * associated with the specified property name.
     */
    public String getProperty(String name);    
    
    /**
     * Gets a boolean associated with the specified property name.
     *  
     * @param name property name
     * @return a boolean associated with the specified property name.
     */
    public boolean getBoolean(String name);
    
    /**
     * Gets a double associated with the specified property name.
     * 
     * @param name property name
     * @return double associated with the specified property name.
     */
    public double getDouble(String name);
    
    /**
     * Gets a float associated with the specified property name.
     * 
     * @param name property name
     * @return a float associated with the specified property name.
     */
    public float getFloat(String name);
    
    /**
     * Gets an int associated with the specified property name.
     * 
     * @param name property name
     * @return an int associated with the specified property name.
     */
    public int getInt(String name);
    
    /**
     * Gets a long associated with the specified property name.
     * 
     * @param name property name
     * @return a long associated with the specified property name.
     */
    public long getLong(String name);
    
    /**
     * Reload the configuration
     * @return boolean true if properties were reloaded, false otherwise     
     */
    public boolean reload();

}
